<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>乐i-选择</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/css/see/reset.min.css">
    <link rel="stylesheet" href="/css/friend/choiceList.min.css?v=<%=$version%>">
    <script src="//cdn.ronghub.com/RongIMLib-2.3.1.js"></script>
    <script src="//cdn.ronghub.com/RongEmoji-2.2.5.min.js"></script>
</head>
<body>
<div id="choiceList" v-cloak>
    <div class="circleBar-top">
        <span class="goback" @click="getBack()"></span>
        选择
    </div>
    <div class="myPost-tab clearfix">
        <span :class="{'active':indexs==1}" @click="getTab(1)">最近</span>
        <span :class="{'active':indexs==2}" @click="getTab(2)">好友</span>
        <!--<span :class="{'active':indexs==3}" @click="getTab(3)">圈子</span>-->
    </div>
    <div class="friendIndex-news">
        <input type="hidden" value="mgb7ka1nm4wyg" id="appKey">
        <input type="hidden" :value="userInfo.token" id="token">
        <input type="hidden" value="" id="chatRoomId">
        <template v-if="indexs==1">
            <template v-for="(item,index) in newsList" v-if="item.messageType!='UnknownMessage'">
                <div class="myFans-list" v-if="item.conversationType==1" @click="getIsshow(item,3)">
                    <template v-if="item.content.user&&item.messageType!='ShareMessage'&&item.messageType!='ShopMessage'">
                        <template v-if="getHead(2,item.targetId)">
                            <template v-if="item.senderUserId==userInfo.chatId">
                                <strong class="list-headImg":style="bgimg(getHead(2,item.targetId).headImg)"></strong>
                                <div class="list-cent" >
                                    <h6>{{getHead(2,item.targetId).name}}
                                        <!--<span class="list-level" :class="[item.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.level}}</span>-->
                                    </h6>
                                </div>
                            </template>
                            <template v-else>
                                <strong class="list-headImg":style="bgimg(item.content.user.portrait)"></strong>
                                <div class="list-cent">
                                    <h6>{{item.content.user.name}}
                                        <!--<span class="list-level" :class="[item.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.level}}</span>-->
                                    </h6>
                                </div>
                            </template>
                        </template>
                    </template>
                    <!--<template v-if="item.messageType=='UnknownMessage'">
                        <template v-if="item.senderUserId==userInfo.id">
                            <strong class="list-headImg":style="bgimg(getHead(2,item.targetId).headImg)"></strong>
                            <div class="list-cent" >
                                <h6>{{getHead(2,item.targetId).name}}
                                    &lt;!&ndash;<span class="list-level" :class="[item.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.level}}</span>&ndash;&gt;
                                </h6>
                            </div>
                        </template>
                        <template v-else>
                            <template v-if="item.content.message">
                                <strong class="list-headImg" :style="bgimg(item.content.message.content.user.portrait)"></strong>
                                <div class="list-cent" >
                                    <h6>{{item.content.message.content.user.name}}</h6>
                                </div>
                            </template>
                        </template>
                    </template>
                    <template v-if="item.content.user&&item.messageType!='ShareMessage'">
                        <template v-if="item.senderUserId==userInfo.id">
                            <strong class="list-headImg":style="bgimg(getHead(2,item.targetId).headImg)"></strong>
                            <div class="list-cent" >
                                <h6>{{getHead(2,item.targetId).name}}
                                    &lt;!&ndash;<span class="list-level" :class="[item.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.level}}</span>&ndash;&gt;
                                </h6>
                            </div>
                        </template>
                        <template v-else>
                            <strong class="list-headImg":style="bgimg(item.content.user.portrait)"></strong>
                            <div class="list-cent">
                                <h6>{{item.content.user.name}}
                                    &lt;!&ndash;<span class="list-level" :class="[item.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.level}}</span>&ndash;&gt;
                                </h6>
                            </div>
                        </template>
                    </template>-->
                    <template v-if="item.objectName=='hkzh:share'&&item.messageType=='ShareMessage'||item.objectName=='hkzh:burstingshare'&&item.messageType=='ShopMessage'">
                        <template v-if="item.senderUserId==userInfo.chatId">
                            <strong class="list-headImg":style="bgimg(getHead(2,item.targetId).headImg)"></strong>
                            <div class="list-cent" >
                                <h6>{{getHead(2,item.targetId).name}}
                                    <!--<span class="list-level" :class="[item.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.level}}</span>-->
                                </h6>
                            </div>
                        </template>
                        <template v-else>
                            <template v-if="item.content.message">
                                <strong class="list-headImg" :style="bgimg(item.content.user.portrait)"></strong>
                                <div class="list-cent" >
                                    <h6>{{item.content.user.name}}</h6>
                                </div>
                        </template>
                    </template>
                    </template>
                </div>
                <div class="myFans-list" v-if="item.conversationType==3" @click="getIsshow(item,2)">
                    <strong class="list-headImg":style="bgimg(getHead(1,item.targetId).coverImgSrc)"></strong>
                    <div class="list-cent" >
                        <h6>{{getHead(1,item.targetId).circleName}}</h6>
                    </div>
                </div>
            </template>

        </template>
        <template v-if="indexs==2">
            <div class="friendsList">
                <template v-for="(item,key) in friendList">
                    <div class="friendsList-list">
                        <div class="list-top">{{item.name}}</div>
                        <template v-for="list in item.list">
                            <a @click="getIsshow(list,1)">
                                <span class="list-topImg" :style="bgimg(list.headImg)"></span>
                                {{list.name}}<span class="list-topGrade" :class="[list.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{list.level}}</span>
                            </a>
                        </template>
                    </div>
                </template>
                <!--<div class="friendsList-list">-->
                <!--<div class="list-top">B</div>-->
                <!--<a><span class="list-topImg"></span>便便<span class="list-topGrade friendsList-girl">LV.52</span></a>-->
                <!--<a><span class="list-topImg"></span>辨别<span class="list-topGrade friendsList-boy">LV.52</span></a>-->
                <!--</div>-->
            </div>
        </template>
        <template v-if="indexs==3">
            <div class="circleList">
                <template v-for="(item,key) in circleList">
                    <div class="friendsList-list">
                        <div class="list-top" v-if="item.name==100">#</div>
                        <div class="list-top" v-else>{{item.name}}</div>
                        <template v-for="list in item.list">
                            <a class="clearfix" @click="getIsshow(list,2)">
                                <span class="list-topImg" :style="bgimg(list.coverImgSrc)"></span>
                                <div>
                                    <h6>{{list.circleName}}</h6>
                                    <p>{{list.categoryName}}<span>&bull;</span>{{list.userCount}}人</p>
                                </div>
                            </a>
                        </template>
                    </div>
                </template>
            </div>
        </template>

    </div>
    <div id="chatPage" v-if="isShow">
        <div class="chatPage-top">
            <span class="goback" @click="getHide()"></span>
            {{name}}
            <!--<span class="chatPage-topImg" @click="getCircleInfo()"></span>-->
        </div>
        <div id="chatPageCent" class="chatPage-cent">
            <!--<div class="chatPage-centData">05-10<span>19:31</span></div>-->
            <template v-for="item in messageRecordList">
                <template v-if="conversationType==1">
                    <div class="chatPage-centlist clearfix" v-if="item.senderUserId==item.targetId&&item.messageType=='TextMessage'">
                        <span class="centlist-head" :style="bgimg(item.content.user&&item.content.user.portrait)"></span>
                        <p>{{item.content.user.name}}</p>
                        <div class="centlist-cent">{{item.content.content}}</div>
                    </div>
                    <div class="chatPage-centlist clearfix" v-if="item.senderUserId==item.targetId&&item.messageType=='ImageMessage'">
                        <span class="centlist-head" :style="bgimg(item.content.user.portrait)"></span>
                        <p>{{item.content.user.name}}</p>
                        <div class="centlist-img">
                            <img :src="'data:image/png;base64,'+item.content.content" class="lazy">
                        </div>
                    </div>
                    <div class="chatPage-centlist clearfix" v-if="item.senderUserId==item.targetId&&item.messageType=='UnknownMessage'">
                        <template v-if="item.content.message.content.user">
                            <span class="centlist-head" :style="bgimg(item.content.message.content.user.portrait)"></span>
                            <p>{{item.content.message.content.user.name}}</p>
                            <div class="centlist-cent centlist-unknown">
                                <strong :style="bgimg(item.content.imgSrc)"></strong>
                                <h6>{{item.content.message.content.title}}</h6>
                                <p>{{item.content.message.content.source}}</p>
                            </div>
                        </template>
                    </div>
                    <div class="chatPage-centlist1 clearfix" v-if="item.senderUserId!=item.targetId&&item.messageType!='ShareMessage'&&item.messageType!='ShopMessage'">
                        <span class="centlist-head" :style="bgimg(userInfo.headImg)"></span>
                        <p>{{userInfo.name}}</p>
                        <div class="centlist-cent">{{item.content.content}}</div>
          <!--              <template v-if="item.senderUserId==userInfo.chatId">
                        <span class="centlist-head" :style="bgimg(getHead(2,item.targetId).headImg)"></span>
                        <p>{{getHead(2,item.targetId).name}}</p>
                        <div class="centlist-cent">{{getHead(2,item.targetId).name}}</div>
                        </template>
                          <template v-else>
                              <span class="centlist-head" :style="bgimg(userInfo.headImg)"></span>
                              <p>{{userInfo.name}}</p>
                              <div class="centlist-cent">{{item.content.content}}</div>
                          </template>-->

                    </div>
                    <div class="chatPage-centlist clearfix" v-if="item.senderUserId==item.targetId&&item.messageType=='ShareMessage'">
                        <template v-if="item.content.user">
                            <span class="centlist-head" :style="bgimg(item.content.user.portrait)"></span>
                            <p>{{item.content.user.name}}</p>
                            <div class="centlist-cent centlist-unknown" @click="getSearch(2,item)">
                                <strong :style="bgimg(item.content.imgSrc)"></strong>
                                <h6>{{item.content.title}}<span class="list-topGrade" v-if="item.content.type==9" :class="[item.content.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.content.level}}</span></h6>
                                <p>{{item.content.source}}</p>
                            </div>
                        </template>
                    </div>
                    <div class="chatPage-centlist1 clearfix" v-if="item.senderUserId!=item.targetId&&item.messageType=='ShareMessage'">
                        <span class="centlist-head" :style="bgimg(userInfo.headImg)"></span>
                        <p>{{userInfo.name}}</p>
                        <div class="centlist-cent centlist-unknown" @click="getSearch(2,item)">
                            <strong :style="bgimg(item.content.imgSrc)"></strong>
                            <h6>{{item.content.title}}<span class="list-topGrade" v-if="item.content.type==9" :class="[item.content.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.content.level}}</span></h6>
                            <p>{{item.content.source}}</p>
                        </div>
                    </div>
                    <div class="chatPage-centlist clearfix" v-if="item.senderUserId==item.targetId&&item.messageType=='ShopMessage'">
                        <template v-if="item.content.user">
                            <span class="centlist-head" :style="bgimg(item.content.user.portrait)"></span>
                            <p>{{item.content.user.name}}</p>
                            <div class="centlist-cent centlist-shop" @click="getSearch(2,item)">
                                <h6><span v-if="item.content.type==8">[爆款抢券]</span><span v-if="item.content.type==7">[拼团抢券]</span>参与活动免费获取好礼，你还在等什么？</h6>
                                <div class="coupon-list centlist-shopCent">
                                    <strong class="coupon-lableIcon"></strong>
                                    <strong class="coupon-txt">{{item.content.discount}}折</strong>
                                    <strong class="slide-img" :style="bgimg(item.content.imgSrc)"></strong>
                                    <h6>{{item.content.title}}</h6>
                                    <span class="bursting-icon3"></span>
                                    <p>商品原价：&yen;{{item.content.pintegral}}</p>
                                </div>
                            </div>
                        </template>
                    </div>
                    <div class="chatPage-centlist1 clearfix" v-if="item.senderUserId!=item.targetId&&item.messageType=='ShopMessage'">
                        <span class="centlist-head" :style="bgimg(userInfo.headImg)"></span>
                        <p>{{userInfo.name}}</p>
                        <div class="centlist-cent centlist-shop" @click="getSearch(2,item)">
                            <h6><span v-if="item.content.type==8">[爆款抢券]</span><span v-if="item.content.type==7">[拼团抢券]</span>参与活动免费获取好礼，你还在等什么？</h6>
                            <div class="coupon-list centlist-shopCent">
                                <strong class="coupon-lableIcon"></strong>
                                <strong class="coupon-txt">{{item.content.discount}}折</strong>
                                <strong class="slide-img" :style="bgimg(item.content.imgSrc)"></strong>
                                <h6>{{item.content.title}}</h6>
                                <span class="bursting-icon3"></span>
                                <p>商品原价：&yen;{{item.content.pintegral}}</p>
                            </div>
                        </div>
                    </div>
                </template>
                <template v-else-if="conversationType==3">
                    <div class="chatPage-centlist clearfix" v-if="item.senderUserId!=userInfo.chatId">
                        <template v-if="item.messageType=='UnknownMessage'">
                            <span class="centlist-head" :style="bgimg(item.content.user.portrait)"></span>
                            <p>{{item.content.user.name}}</p>
                            <div class="centlist-cent centlist-unknown">
                                <strong :style="bgimg(item.content.imgSrc)"></strong>
                                <h6>{{item.content.title}}</h6>
                                <p>{{item.content.source}}</p>
                            </div>
                        </template>
                        <template v-else-if="item.messageType!='UnknownMessage'">
                            <span class="centlist-head" :style="bgimg(item.content.user.portrait)"></span>
                            <p>{{item.content.user.name}}</p>
                            <div class="centlist-cent">{{item.content.content}}</div>
                        </template>
                        <template v-else-if="item.messageType=='ShareMessage'">
                            <span class="centlist-head" :style="bgimg(item.content.user.portrait)"></span>
                            <p>{{item.content.user.name}}</p>
                            <div class="centlist-cent centlist-unknown" @click="getSearch(2,item)">
                                <strong :style="bgimg(item.content.imgSrc)"></strong>
                                <h6>{{item.content.title}}<span class="list-topGrade" v-if="item.content.type==9" :class="[item.content.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.content.level}}</span></h6>
                                <p>{{item.content.source}}</p>
                            </div>
                        </template>
                        <template v-else-if="item.messageType=='ShopMessage'">
                            <span class="centlist-head" :style="bgimg(item.content.user.portrait)"></span>
                            <p>{{item.content.user.name}}</p>
                            <div class="centlist-cent centlist-shop" @click="getSearch(2,item)">
                                <h6><span v-if="item.content.type==8">[爆款抢券]</span><span v-if="item.content.type==7">[拼团抢券]</span>参与活动免费获取好礼，你还在等什么？</h6>
                                <div class="coupon-list centlist-shopCent">
                                    <strong class="coupon-lableIcon"></strong>
                                    <strong class="coupon-txt">{{item.content.discount}}折</strong>
                                    <strong class="slide-img" :style="bgimg(item.content.imgSrc)"></strong>
                                    <h6>{{item.content.title}}</h6>
                                    <span class="bursting-icon3"></span>
                                    <p>商品原价：&yen;{{item.content.pintegral}}</p>
                                </div>
                            </div>
                        </template>
                        <template v-else-if="item.messageType!='ShareMessage'&&item.messageType!='ShopMessage'">
                            <span class="centlist-head" :style="bgimg(item.content.user.portrait)"></span>
                            <p>{{item.content.user.name}}</p>
                            <div class="centlist-cent">{{item.content.content}}</div>
                        </template>
                        <template v-else-if="item.messageType=='TextMessage'">
                            <span class="centlist-head" :style="bgimg(item.content.user.portrait)"></span>
                            <p>{{item.content.user.name}}</p>
                            <div class="centlist-cent">{{item.content.content}}</div>
                        </template>
                    </div>
                    <div class="chatPage-centlist1 clearfix" v-else-if="item.senderUserId==userInfo.chatId">
                        <template v-if="item.messageType=='ShareMessage'">
                            <span class="centlist-head" :style="bgimg(userInfo.headImg)"></span>
                            <p>{{userInfo.name}}</p>
                            <div class="centlist-cent centlist-unknown" @click="getSearch(2,item)">
                                <strong :style="bgimg(item.content.imgSrc)"></strong>
                                <h6>{{item.content.title}}<span class="list-topGrade" v-if="item.content.type==9" :class="[item.content.sex=='1'?'friendsList-boy':'friendsList-girl']">LV.{{item.content.level}}</span></h6>
                                <p>{{item.content.source}}</p>
                            </div>
                        </template>
                        <template v-if="item.messageType=='ShopMessage'">
                            <span class="centlist-head" :style="bgimg(userInfo.headImg)"></span>
                            <p>{{userInfo.name}}</p>
                            <div class="centlist-cent centlist-shop" @click="getSearch(2,item)">
                                <h6><span v-if="item.content.type==8">[爆款抢券]</span><span v-if="item.content.type==7">[拼团抢券]</span>参与活动免费获取好礼，你还在等什么？</h6>
                                <div class="coupon-list centlist-shopCent">
                                    <strong class="coupon-lableIcon"></strong>
                                    <strong class="coupon-txt">{{item.content.discount}}折</strong>
                                    <strong class="slide-img" :style="bgimg(item.content.imgSrc)"></strong>
                                    <h6>{{item.content.title}}</h6>
                                    <span class="bursting-icon3"></span>
                                    <p>商品原价：&yen;{{item.content.pintegral}}</p>
                                </div>
                            </div>
                        </template>
                        <template v-if="item.messageType!='ShareMessage'&&item.messageType!='ShopMessage'">
                            <span class="centlist-head" :style="bgimg(userInfo.headImg)"></span>
                            <p>{{userInfo.name}}</p>
                            <div class="centlist-cent">{{item.content.content}}</div>
                        </template>
                    </div>
                </template>
            </template>
        </div>
        <div class="chatPage-butt">
            <!--<span class="chatPage-yyin"></span>-->
            <input type="text" placeholder="请输入消息..." v-model="text">
            <span class="chatPage-add" @click="getSendMessage()">发送</span>
        </div>
        <prompt-view ref="prompt"></prompt-view>
    </div>
    <prompt-view ref="prompt"></prompt-view>
</div>
<script src='/plugins/js/jquery-1.11.3.min.js'></script>
<script type="text/javascript" src="/plugins/js/vue.min.js"></script>
<script type="text/javascript" src="/js/friend/choiceList.js?v=<%=$version%>"></script>

</body>
</html>